package com.zatech.cgnci.project.controller;

import com.zatech.cgnci.project.dto.MessageSendDTO;
import com.zatech.cgnci.project.service.CgnciMessageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @author user
 */
@RestController
@RequestMapping("/api/message/send")
@RequiredArgsConstructor
@Api(tags = "消息发送接口")
public class CgnciMessageSendController {

    private final CgnciMessageService messageService;
    
    @PostMapping
    @ApiOperation("发送消息")
    public void send(@RequestBody @Valid MessageSendDTO sendDTO) {
        messageService.sendMessage(sendDTO);
    }
} 